<div class='top'>
	<h1>Mis Citas</h1>
	<%= display_menu %>
</div>
<div class='body'>
<table class='list'>
  <tr>
  <% for column in ["Fecha - Hora", @opposite_user.capitalize, "Estado"] %>
    <th><%= column %></th>
  <% end %>
  </tr>

<% for record in @collection %>
  <tr>
    <td><%=h record.send(:fecha).strftime("%d/%m/%Y - %H:%M") %></td>
    <td><%=h record.send(@opposite_user.to_sym).human_name %></td>
		<td><%=h record.send(:estado) %></td>
    <td>
			<%= link_to image_tag("show.png", :size => "30x30", :border => 0), :action => 'show_cita', :id => record %>
	    <%= link_to image_tag("delete.png", :size => "30x30", :border => 0), { :action => 'cancel_cita', :id => record }, :confirm => 'Are you sure?', :method => :post %>
    </td>
  </tr>
<% end %>
</table>

<%= link_to '<--', { :page => @pages.current.previous } if @pages.current.previous %>
<%= link_to '-->', { :page => @pages.current.next } if @pages.current.next %>



<%= link_to image_tag("add.png", :size => "40x40", :border => 0), :action => '#' %>

<p class='notice'><%= flash[:notice] %></p>
</div>